import React, { Component } from 'react'
import { connect } from 'react-redux'
import { createAddMsg } from '../../redux/count_action'
class Demo extends Component {
    add = () => {
        this.props.jiasi(4)
    }
    render() {
        return (
            <div>
                <button onClick={this.add}>加4</button>
            </div>
        )
    }
}
export default connect(
    //映射状态
    state => ({ he: state }),
    // 映射状态的方法
    { jiasi: createAddMsg }
)(Demo)
